#ifndef GAME_ENGINE_H
#define GAME_ENGINE_H

#include "reversi_board.h"
#include <vector>

enum player { WHITE_PLAYER, BLACK_PLAYER };



class GameEngine
{
public:
    GameEngine();    
    void verify_move(int column, int row);
    void make_move(int* move_limits);
    void get_available_moves(std::vector<int> &);
    int get_current_player();
    int* get_move_limits();
    void set_curr_player();
    void switch_players();
    void check_valid_moves();
    void game_finished();
    bool is_finished();
    int get_winner();
    int get_score(int player);
    ReversiBoard* get_board(int player);

    void set_board(ReversiBoard *black_board, ReversiBoard *white_board);
    void set_board(ReversiBoard *board, player p);
    void set_player(player p);
    void teste_move(int column, int row);

    ReversiBoard m_white_board;
    ReversiBoard m_black_board;
    ReversiBoard *m_curr_board;
    ReversiBoard *m_opp_board;

    int m_current_player;
    int m_curr_row;
    int m_curr_column;
    bool m_valid_move;
    int m_num_moves;
    int m_white_score;
    int m_black_score;
    int m_winner;
    bool m_finished;
};

#endif // GAME_ENGINE_H
